package response

type Response struct {
	Code     int    `json:"errcode"`
	Message  string `json:"errmsg"`
	Type     string `json:"type"`
	MediaID  string `json:"media_id"`
	CreateAt string `json:"created_at"`
}

func (r Response) IsSuccess() bool {
	return r.GetCode() == 0
}

func (r Response) GetCode() int {
	return r.Code
}

func (r Response) GetMessage() string {
	return r.Message
}
